<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue2.js"></script>
</head>
<body>
<!--
    1.事件绑定的简写形式   v-on  可以省略  @click
    2.函数的形式简写      changeAge(){this.age+=1}
-->
<div id="app">
    <p>age:{{ age }}</p>
    <button @click="changeAge">age+1</button>
</div>

<script>
    let vm = new Vue({
        el: '#app',
        data: {
            age: 10,
            info: "hello",
            info2:''
        },
        methods: {  //  es6
            changeAge() {
                this.age += 1
            }
        }
    })
</script>
</body>
</html>